<?php
/*
 * Created on 11/12/2011
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
	// HTTP/1.1
	header("Cache-Control: no-store, no-cache, must-revalidate");
	header("Cache-Control: post-check=0, pre-check=0", false);
	
	// HTTP/1.0
	header("Pragma: no-cache");
	header("Content-Type: text/html; charset=ISO-8859-1",true) ;
	
include "../conexao/conexao.php";
$conn =  conectar();

include "../funcoes/config.php";
$config = new config();

include "../funcoes/funcoes.php";
$funcoes = new funcoes();

$query =  str_replace("?","{$_GET['id']}",$config -> sql_gecko_venda_from);
$result = mysql_query ($query) or die($config -> msg_erro_banco_consulta . mysql_errno() . " - " . mysql_error());
$retorno = "";

if(mysql_num_rows($result) > 0){
	$row = mysql_fetch_assoc($result);
	echo "1#".$row["codigo"]."#".$row["qtdvenda"]."#".$row["descricao"]."#".$funcoes -> formataValor($row["vlrunit"])."#".$row["desconto"]."#".$funcoes -> formataValor($row["vlrrec"])."#".$row["qtdprod"];
}else{
	echo $result;	
}

?>